import http from '@/utils/httpRequest'

// datax插件api

export function getList (params) {
  return http({
    url: http.requestUrl('/api/dataxPlugin'),
    method: 'get',
    params
  })
}

export function fetchPlugin (params) {
  return http({
    url: http.requestUrl('/api/dataxPlugin/' + params),
    method: 'get'
  })
}

export function updatePlugin (data) {
  return http({
    url: http.requestUrl('/api/dataxPlugin/'),
    method: 'put',
    data
  })
}

export function createPlugin (data) {
  return http({
    url: http.requestUrl('/api/dataxPlugin/'),
    method: 'post',
    data
  })
}

export function deletePlugin (data) {
  return http({
    url: http.requestUrl('/api/dataxPlugin/'),
    method: 'delete',
    params: data
  })
}
